package com.bretagne5.radio;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;

public class ReseauxSociaux extends Activity implements OnClickListener {
	
	ImageButton facebook , twitter, google ;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.reseaux_sociaux);
		
		facebook = (ImageButton)findViewById(R.id.imageButtonFacebook);
		google = (ImageButton)findViewById(R.id.imageButtonGoogle);
		twitter = (ImageButton)findViewById(R.id.imageButtonTwitter);
		
		facebook.setOnClickListener(this);
		google.setOnClickListener(this);
		twitter.setOnClickListener(this);
		
	}

	@Override
	public void onClick(View v) {

		switch (v.getId()) {
		case R.id.imageButtonFacebook:
			
			Intent intentFacebook = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/bretagne5"));
			startActivity(intentFacebook);
			
			break;
		case R.id.imageButtonGoogle:
			
			Intent intentGoogle = new Intent(Intent.ACTION_VIEW, Uri.parse("https://plus.google.com/+Bretagne5fr/posts"));
			startActivity(intentGoogle);
			
			break;
		case R.id.imageButtonTwitter:
			
			Intent intentTwitter = new Intent(Intent.ACTION_VIEW, Uri.parse("https://twitter.com/radiobretagne5"));
			startActivity(intentTwitter);
	
			break;
			
		default:
			break;
		}
		
	}

}
